package com.android.scj.tc.bean;
/**
 * PSAM卡复位返回
 * @author LiuYaDong
 *
 */
public class _PSAMResetResponse {
	/**
	 * 	0	1	PSAM卡槽号	0x00~0x05表示卡槽号
	 1	1	status	执行状态,0x00表示复位成功，0x01表示复位失败

	 */
	private static final String cmdcode = "E8";
	private String context = "00";
	private String status = "00";
	private CMD_55AA cmd = null;
	private _PSAMResetResponse(){

	}

	public static _PSAMResetResponse disassemble(String cmdstr){
		_PSAMResetResponse p = new _PSAMResetResponse();
		p.cmd = CMD_55AA.disassemble(cmdstr);
		if(p.cmd == null || !p.cmd.getCMD().equals(cmdcode) || p.cmd.getDATA().length() < 2)return null;
		p.status = p.cmd.getDATA().substring(0,2);
		p.context = p.cmd.getDATA().substring(2);
		return p;
	}

	public String getContext() {
		return context;
	}
	public String getStatus() {
		return status;
	}

}
